﻿using System.ComponentModel.Composition;
using System.Windows.Media;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;

namespace Colorific {
	#region Format definition
	/// <summary>
	/// Defines an editor format for the Colorific type that has a purple background
	/// and is underlined.
	/// </summary>
	[Export(typeof(EditorFormatDefinition))]
	[ClassificationType(ClassificationTypeNames = "Colorific-Methods")]
	[Name("Colorific-Methods")]
	[UserVisible(true)] //this should be visible to the end user
	[Order(Before = Priority.Default)] //set the priority to be after the default classifiers
	internal sealed class MethodFormat : ClassificationFormatDefinition {
		/// <summary>
		/// Defines the visual format for the "Colorific" classification type
		/// </summary>
		public MethodFormat() {
			this.DisplayName = "Methods (Colorific)"; //human readable version of the name
			this.ForegroundColor = Colors.Chocolate;
		}
	}

	[Export(typeof(EditorFormatDefinition))]
	[ClassificationType(ClassificationTypeNames = "Colorific-Variables")]
	[Name("Colorific-Variables")]
	[UserVisible(true)] //this should be visible to the end user
	[Order(Before = Priority.Low)] //set the priority to be after the default classifiers
	internal sealed class VariableFormat : ClassificationFormatDefinition {
		/// <summary>
		/// Defines the visual format for the "Colorific" classification type
		/// </summary>
		public VariableFormat() {
			this.DisplayName = "Variables (Colorific)"; //human readable version of the name
			this.ForegroundColor = Colors.Magenta;
		}
	}
	#endregion //Format definition
}
